<?php

namespace App\Console;

use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;

class Kernel extends ConsoleKernel
{
    /**
     * The Artisan commands provided by your application.
     *
     * @var array
     */
    protected $commands = [
        Commands\CreateStudyingInfo::class,
        Commands\CreateCourseLiveNotice::class,
        Commands\ModifyUserFissionInfo::class,
        Commands\SyncTeacherInfoTousers::class,
        Commands\DeleteMoreUserGrowData::class,
        Commands\WechatRegisterUserPush::class,
        Commands\DeleteUserInfoToTest::class,
        Commands\CreateRegisterUserPushMessage::class,
        Commands\ModifyUserPasswd::class,
        Commands\UserVisitInfoCount::class,
        Commands\AwardUserCourse::class,
        Commands\AddUserOpenidToEnroll::class,
        Commands\SyncUserInfoToApp::class,
    ];

    /**
     * Define the application's command schedule.
     *
     * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
     * @return void
     */
    protected function schedule(Schedule $schedule)
    {
        $schedule->command('wechat:register_user_push')->everyThirtyMinutes();
        $schedule->command('user:visit_info_count')->daily();
//        $schedule->command('sync:user_info_to_app')->everyMinute();
    }

    /**
     * Register the Closure based commands for the application.
     *
     * @return void
     */
    protected function commands()
    {
        require base_path('routes/console.php');
    }
}
